import Head from 'next/head'
import Image from 'next/image'
import { Inter } from 'next/font/google'
import styles from '@/styles/Home.module.css'
import Header from '@/components/header'
import Nav from '@/components/Nav'
import Swiper,{loadSwiper} from '@/components/Swiper'
import Movie,{loadMove} from '@/components/Movie'
import Layout from '@/components/Layout'
const inter = Inter({ subsets: ['latin'] })

export default function Home({swiper,movie}) {
  return (
    <>
    <Layout>
      <Swiper data={swiper}></Swiper>
      <Movie data={movie} title="电影1"></Movie>
    </Layout>
    </>
  )
}

export async function getStaticProps (){
   let {data:swiper} = await loadSwiper()
   let {data:movie} = await loadMove()
   return {
    props:{
      swiper,
      movie
    }
   }
}
